package edu.nf.vrs.reservation.dao;

import edu.nf.vrs.reservation.entity.Reservation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Lv
 * @date 2022/4/1
 */
public interface ReservationDao {

    /**
     * 查询所有预约
     * @param reservation
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Reservation> listReservation(@Param("reservation") Reservation reservation,
                                      @Param("pageNum") Integer pageNum,
                                      @Param("pageSize") Integer pageSize);

    /**
     * 添加预约
     * @param reservation
     */
    void addReservation(Reservation reservation) ;

    /**
     * 删除预约
     * @param reservationId
     */
    void deleteReservation(int reservationId) ;

    /**
     * 根据预约ID查询
     * @param reservationId
     * @return
     */
    Reservation selectById(int reservationId) ;

    /**
     * 根据用户id查询预约记录
     * @param uid
     * @return
     */
    List<Reservation> listReservationByUserId(Integer uid);
}
